import APP from '@/components/app'
export const menuRouter = [
  {
    path: '/usercenter',
    name: 'UserCenter',
    component: () => import('@/views/user-center'),
    meta: { icon: 'menu-user', title: '个人中心', whiteList: true }
  },
  {
    path: '/securitycenter',
    name: 'SecurityCenter',
    component: () => import('@/views/security-center'),
    meta: { icon: 'menu-security', title: '账号安全' }
  },
  {
    path: '/orderlist',
    name: 'OrderList',
    component: () => import('@/views/order-list'),
    meta: { icon: 'menu-order', title: '订单记录' }
  },
  {
    path: '/couponlist',
    name: 'CouponIndex',
    component: () => import('@/views/coupon-list'),
    meta: { icon: 'menu-coupon', title: '领券中心' }
  },
  {
    path: '/messagelist',
    name: 'MessageIndex',
    component: () => import('@/views/message-list'),
    meta: { icon: 'menu-message', title: '消息中心' }
  },
  {
    path: '/payzb',
    name: 'PayZb',
    component: () => import('@/views/pay/pay-zb'),
    meta: {
      icon: 'menu-zb',
      title: '我的智币',
      whiteList: true,
      minVersion: {
        '22': { v: '3.1.6', maxV: '3.1.6.32' }
      }
    }
  }
  // {
  //   path: '/message',
  //   name: 'MessageList',
  //   component: () => import('@/views/message'),
  //   meta: { icon: 'menu-msg', title: '消息通知' }
  // }
]
export const constantRoutes = [
  {
    path: '/',
    redirect: '/usercenter',
    component: () => import('@/layout/index'),
    children: menuRouter
  },
  {
    path: '/pay',
    name: 'PayPage',
    component: () => import('@/views/pay/pay-page')
  },
  {
    path: '/pay-success',
    name: 'PaySuccess',
    component: () => import('@/views/pay/pay-success')
  },
  {
    path: '/pay-zb',
    name: 'PayZB',
    component: () => import('@/views/pay/pay-zb')
  },
  {
    path: '/rights',
    name: 'Rights',
    component: () => import('@/views/pay/rights')
  },
  {
    path: '/login-page',
    name: 'LoginPage',
    component: () => import('@/views/login'),
    hidden: true
  },
  {
    path: '/right-open',
    name: 'RightOpen',
    component: () => import('@/views/right-open'),
    hidden: true
  },
  {
    path: '/partylogincb',
    name: 'PartyLoginCb',
    component: () => import('@/views/login/party-login-cb'),
    hidden: true
  },
  {
    path: '/expired',
    name: 'MemberExpired',
    component: () => import('@/views/expired')
  },
  {
    path: '/account-abnormal',
    name: 'AccountAbnormal',
    component: () => import('@/views/login/account-abnormal')
  },
  {
    path: '/over-device',
    name: 'OverDevice',
    component: () => import('@/components/account/over-device-dialog'),
    props: {
      isPage: true
    }
  },
  {
    path: '/draw-trial-result',
    name: 'DrawTrialResult',
    component: () => import('@/views/draw-trial-result')
  },
  {
    path: '/v3',
    component: APP,
    children: [
      {
        path: 'expired',
        name: 'MemberExpiredV3',
        component: () => import('@/views/rights-v2/expired-v3')
      }
    ]
  },
  {
    path: '/v2',
    component: APP,
    children: [
      {
        path: 'pay-success',
        name: 'PaySuccessV2',
        component: () => import('@/views/rights-v2/pay-success')
      },
      {
        path: 'expired',
        name: 'MemberExpiredV2',
        component: () => import('@/views/rights-v2/expired')
      },
      {
        path: 'rights',
        name: 'RightsV2',
        component: () => import('@/views/rights-v2/rights')
      }
    ]
  },
  {
    path: '/vip-group',
    name: 'VIPGroup',
    component: () => import('@/views/vip-group')
  },
  {
    path: '/scene-seckill',
    name: 'SceneSeckill',
    component: () => import('@/views/scene/seckill')
  },
  {
    path: '*',
    redirect: '/',
    hidden: true
  }
]
